


var t = document.querySelector("#toTop");
window.onscroll = function () {
    console.log(document.documentElement.scrollTop > 1000 || document.body.scrollTop > 1000);
    if(document.documentElement.scrollTop > 1000 || document.body.scrollTop > 1000){
        t.style.display = "block";
    }else{
        t.style.display = "none";
    }
};


t.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
});


/*function  Top() {
    window.scrollTo(0,0);
}*/





var dt_nav_btn = document.querySelector("#dt-nav-btn a");
var dt_nav_content = document.querySelector("#dt-nav-content");
/*mouseover鼠标划入*/
dt_nav_btn.addEventListener("mouseover",function () {
    dt_nav_content.style.display = "block";
    dt_nav_content.style.opacity = "1";
});
dt_nav_btn.addEventListener("mouseleave",function () {
    dt_nav_content.style.display = "none";
    dt_nav_content.style.opacity = "1";
});
/*mouseleave鼠标离开除本身*/
dt_nav_content.addEventListener("mouseleave",function () {
    dt_nav_content.style.display = "none";
});
dt_nav_content.addEventListener("mouseover",function () {
    dt_nav_content.style.display = "block";
});




/*var dt = document.querySelector("#dt");
var dt_gengduo = document.querySelector("#dt-gengduo");
dt.addEventListener("mouseover",function () {
    console.log("谁在上面");
    dt_gengduo.style.display = "block";
});

dt_gengduo.addEventListener("mouseleave",function () {
    console.log("离开了");
    dt_gengduo.style.display = "none";
});*/




